obj={
    name:'zs',
    age:18,
    sex:'男',
    a:undefined,
    b:null,
    e:{}
}

function deepClone(obj){
    return new Promise((resolve) => {
        const { port1,port2 } =new MessageChannel()
        port1.postMessage(obj)
        port2.onmessage = (msg) => {
            resolve(msg.data)
        }
    })
}
deepClone(obj).then(res => {
    console.log(res);
})
